package com.zcxy.fast.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zcxy.fast.bean.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotEmpty;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * vue组件数据配置
 *
 * @author zcc
 * @email  860474958@qq.com
 * @date   2021-01-15 07:40:36
 */
@Data
@TableName(value ="sys_componet",autoResultMap = true)
@ApiModel(value = "SysComponet", description = "vue组件数据配置")
public class SysComponet extends BaseEntity {

    @NotEmpty(message = "name为必填字段")
    @Length(max = 50, message = "name 超出最大长度：50")
    @ApiModelProperty(value = " 组件描述", required = false)
    private String name ;

    @NotEmpty(message = "code为必填字段")
    @Length(max = 50, message = "code 超出最大长度：50")
    @ApiModelProperty(value = " 编码", required = false)
    private String code ;

    @NotEmpty(message = "url为必填字段")
    @Length(max = 50, message = "url 超出最大长度：50")
    @ApiModelProperty(value = " 组件路径", required = false)
    private String url ;

    @NotEmpty(message = "funcName为必填字段")
    @Length(max = 50, message = "funcName 超出最大长度：50")
    @ApiModelProperty(value = " 方法名称", required = false)
    private String funcName ;

    @NotEmpty(message = "applyTable为必填字段")
    @Length(max = 50, message = "applyTable 超出最大长度：50")
    @ApiModelProperty(value = " 组件对应数据表", required = false)
    private String applyTable ;

    @NotEmpty(message = "postType为必填字段")
    @Length(max = 50, message = "postType 超出最大长度：50")
    @ApiModelProperty(value = " 请求类型post/get", required = false)
    private String postType ;

    @Length(max = 500, message = "defaultParams 超出最大长度：500")
    @ApiModelProperty(value = " 默认请求参数", required = false)
    private String defaultParams ;

    @Length(max = 50, message = "params 超出最大长度：50")
    @ApiModelProperty(value = " 可变参数1", required = false)
    private String params ;

    @Length(max = 50, message = "paramsTwo 超出最大长度：50")
    @ApiModelProperty(value = " 可变参数2", required = false)
    private String paramsTwo ;

    @TableId(type = IdType.UUID)
    @Length(max = 50, message = "id 超出最大长度：50")
    @ApiModelProperty(value = " ", required = false)
    private String id ;

    @ApiModelProperty(value = "值字段 ", required = false)
    private String value ;

    @ApiModelProperty(value = " label字段", required = false)
    private String label ;

    @TableField(exist = false)
    private List<SysAttachment> paramsAttachments;

    private  String props;

}
